/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgTopicActivitySetting extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgTopicActivitySetting";
	public static final String ALIAS_FK_TOPIC_ID = "fkTopicId";
	public static final String ALIAS_START_DATE = "startDate";
	public static final String ALIAS_END_DATE = "endDate";
	public static final String ALIAS_ACTIVITY_TYPE = "1-free 2-charge 3-needzhengnengliang";
	public static final String ALIAS_POINT = "point";
	
	//date formats
	public static final String FORMAT_START_DATE = DATE_FORMAT;
	public static final String FORMAT_END_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * fkTopicId       db_column: fkTopicId 
     */	
	
	private java.lang.Integer fkTopicId;
    /**
     * startDate       db_column: startDate 
     */	
	private java.util.Date startDate;
    /**
     * endDate       db_column: endDate 
     */	
	private java.util.Date endDate;
    /**
     * 1-free 2-charge 3-needzhengnengliang       db_column: activityType 
     */	
	
	private java.lang.Integer activityType;
    /**
     * point       db_column: point 
     */	
	
	private java.lang.Integer point;
	//columns END

	public SmgTopicActivitySetting(){
	}

	public SmgTopicActivitySetting(
		java.lang.Integer fkTopicId
	){
		this.fkTopicId = fkTopicId;
	}

	public void setFkTopicId(java.lang.Integer value) {
		this.fkTopicId = value;
	}
	
	public java.lang.Integer getFkTopicId() {
		return this.fkTopicId;
	}
	public String getStartDateString() {
		return DateConvertUtils.format(getStartDate(), FORMAT_START_DATE);
	}
	public void setStartDateString(String value) {
		setStartDate(DateConvertUtils.parse(value, FORMAT_START_DATE,java.util.Date.class));
	}
	
	public void setStartDate(java.util.Date value) {
		this.startDate = value;
	}
	
	public java.util.Date getStartDate() {
		return this.startDate;
	}
	public String getEndDateString() {
		return DateConvertUtils.format(getEndDate(), FORMAT_END_DATE);
	}
	public void setEndDateString(String value) {
		setEndDate(DateConvertUtils.parse(value, FORMAT_END_DATE,java.util.Date.class));
	}
	
	public void setEndDate(java.util.Date value) {
		this.endDate = value;
	}
	
	public java.util.Date getEndDate() {
		return this.endDate;
	}
	public void setActivityType(java.lang.Integer value) {
		this.activityType = value;
	}
	
	public java.lang.Integer getActivityType() {
		return this.activityType;
	}
	public void setPoint(java.lang.Integer value) {
		this.point = value;
	}
	
	public java.lang.Integer getPoint() {
		return this.point;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("FkTopicId",getFkTopicId())
			.append("StartDate",getStartDate())
			.append("EndDate",getEndDate())
			.append("ActivityType",getActivityType())
			.append("Point",getPoint())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getFkTopicId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgTopicActivitySetting == false) return false;
		if(this == obj) return true;
		SmgTopicActivitySetting other = (SmgTopicActivitySetting)obj;
		return new EqualsBuilder()
			.append(getFkTopicId(),other.getFkTopicId())
			.isEquals();
	}
}

